/*============================================================================
  Responsive tables, defined with .responsive-table on table element.
==============================================================================*/
@include media-query($small) {
  .responsive-table {
    width: 100%;

    thead {
      display: none;
    }

    tr {
      display: block;
    }

    // IE9 table layout fixes
    tr,
    td {
      float: left;
      clear: both;
      width: 100%;
    }

    th,
    td {
      display: block;
      text-align: right;
      padding: $gutter / 2;
      margin: 0;
    }

    td::before {
      content: attr(data-label);
      float: left;
      text-align: center;
      padding-right: 10px;
    }
  }

  // Add a keyline between rows
  .responsive-table-row + .responsive-table-row,
  tfoot > .responsive-table-row:first-child {
    position: relative;
    margin-top: 10px;
    padding-top: $gutter / 2;

    &::after {
      content: '';
      display: block;
      position: absolute;
      top: 0;
      left: $gutter / 2;
      right: $gutter / 2;
      border-bottom: 1px solid $color-border;
    }
  }
}
